package com.sendpo.zjx.sendpo.application;

import android.app.Activity;
import android.app.Application;

import com.mob.MobSDK;
import com.sendpo.zjx.sendpo.net.HttpUrl;

import org.xutils.x;

import java.util.LinkedList;

//import io.vov.vitamio.Vitamio;

/**
 * Created by 朱俊鑫 on 2017/7/4.
 * information 自己的应用类
 */

public class MyApplication extends Application {
    public static MyApplication instance;
    public static LinkedList<Activity> activities=new LinkedList();
    public static MyApplication getInstance() {
        return instance;
    }
    public static void addActivity(Activity activity){
        activities.add(activity);
    };
    public static  void exit(){
        for(Activity activity :activities){
            activity.finish();
        }
    };
    @Override
    public void onCreate() {
        super.onCreate();
        instance=this;
        //xutils框架初始化
        x.Ext.init(this);
      //    Vitamio.isInitialized(getApplicationContext());

        MobSDK.init(this, HttpUrl.MOBSMS_APPKEY, HttpUrl.MOBSMS_SECRET);

    }

}
